import time

def sort(nomera):
    ad = True
    while ad:
        ad = False
        for i in range(len(nomera) - 1):
            if nomera[i] > nomera[i + 1]:
                nomera[i], nomera[i + 1] = nomera[i + 1], nomera[1]
                ad = True


def uwu(nam):
    uaua = open(nam, "r")
    data = uaua.readlines()
    return data

modin = uwu("m1_sorted.txt")
mdva = uwu("m2_reverse.txt")
mtri = uwu('m3_shuffle.txt')

t_start = time.time()
sort(modin)
t_finish = time.time
print('m1_sorted.txt',round((t_finish-t_start)*1000), 'milisekundi')



t_start = time.time()
sort(mdva)
t_finish = time.time()
print('m2_reverse',round((t_finish-t_start)*1000), 'milisekundi')

t_start = time.time()
sort(mtri)
t_finish = time.time()
print('m3_shuffle',round((t_finish-t_start)*1000), 'milisekundi')



      
    
    
